﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace MyXnaGame
{
    public abstract class Sprite
    {
        public Vector2 spritePosition;
        protected Rectangle viewRect;
        protected int frameWidth = 96;
        protected int frameHeight = 96;


        //
        //The current position of the Sprite
        //public Vector2 Position = new Vector2(0, 0);

        //The texture object used when drawing the sprite
        protected Texture2D mSpriteTexture;
        protected Color spriteColor = Color.White;

        public Sprite()
        {
        }

        public Sprite(Vector2 position)
        {
            spritePosition = position;
        }

        //Load the texture for the sprite using the Content Pipeline
        public virtual void LoadContent(ContentManager content, string contentLocation)
        {
            spritePosition = new Vector2(100, 200);
        }

        public Rectangle GetCollisionRect()
        {
            return new Rectangle((int)spritePosition.X, (int)spritePosition.Y, frameWidth, frameHeight);
        }

        public bool IsColliding { get; set; }

        public virtual void Update(GameTime gameTime)
        {

        }

        public virtual void Draw(SpriteBatch spriteBatch)
        {
        }
    }
}
